<template>
  <div>
    <Header />
    <Select
    :cityList="cityList"
    :test="test"
    />
    <span>这里是home</span>
    <Footer />
  </div>
</template>

<script>
import Header from '@/components/modules/Header'
import Footer from '@/components/modules/Footer'
import Select from '@/components/modules/Select'
export default {
  data () {
    return {
      cityList: [],
      cityListMore: [],
      test: [1, 2, 3]
    }
  },
  // props: [id],
  components: {
    Header,
    Footer,
    Select
  },
  created () {
    this.$http.getCity()
      .then(resp => {
        if (resp.status === 200) {
          // console.log(resp)
          this.cityList = resp.data.data.list
          this.cityListMore = resp.data.data.more
        } else {
          return 'error!! status !== 200'
        }
      })
  },
  beforeRouteUpdate () {
    console.log(123)
  }
}
</script>

<style lang="scss">

</style>
